<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Address extends Model
{
    use HasFactory;
    protected $table = 'sp_address';
    protected $primaryKey = 'id';
    protected $guarded = [];
    //是否软删除: 0否 1是
    const NODELETE=0;
    const DELETE=1;
    //是否为默认地址:0=不是,1=是
    const NODEFAULT=0;
    const DEFAULT=1;
    public static function checkPhone($phone = '')
    {
        return preg_match("/^1[2-9]\d{9}$/", $phone);
    }
}
